<?php
global $base_dir;
$base_dir='../';

/**** 模块调用*****/
include_once($base_dir."inc/inc_connect.php");		//通用函数包含文件
include_once("index_inc.php");
include_once("func/function.php");
include_once($base_dir."inc/manage.php");			//后台通用包含文件
include_once("../msg/api/msg_mdlAPI.php");			//短信	
?>
<?php
//接收参数
if(is_array($_GET))
{
	foreach($_GET as $key => $value)
	{
		$$key=$value;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$lanmu_name?>-后台管理系统</title>
<link href="../style/common.css" rel="stylesheet" type="text/css" />
<script src="../js/checkform.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/kindeditor/kindeditor.js"></script>

<link href="../js/dq_calendar/dq_calendar.css" rel="stylesheet" type="text/css" />
<script src="../js/dq_calendar/dq_calendar.js" type="text/javascript"></script>
<script language="javascript">
//表单验证
function this_submit()
{
	if(checkform())
	{
		document.f1.submit();
	}
}
</script>
</head>
<body>
<?php
$t=new Tbl_Act($tbl_name,$tbl_key);		//创建表对象
$t->$tbl_key=$_GET['id'];
$t->GetOne(array($tbl_key.',='));
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="lanmu_table">
  <tr>
    <td height="30" valign="bottom"><a href="<?=$url_list?>"><span class="lanmu_title"><?=$lanmu_name?></span></a><span class="lanmu_title2">&nbsp;&gt;&nbsp;修改</span></td>
  </tr>
</table>
<form action="<?=$url_act?>?<?=QueryString()?>" method="post" name="f1" enctype="multipart/form-data">
  <table border="0" cellspacing="1" class="margintop30">
  <tr>
		<td width="114" height="25" align="right" class="title01">门票名称:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_name" type="text" id="Tkt_name" value="<?=$t->Tkt_name?>" bt="1" char="门票名称"/><span class="red">*</span>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">窗口价:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_price1" type="text" id="Tkt_price1" value="<?=$t->Tkt_price1?>" bt="1" char="窗口价"/><span class="red">*</span>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">销售价:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_price2" type="text" id="Tkt_price2" value="<?=$t->Tkt_price2?>" bt="1" char="销售价"/><span class="red">*</span>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">结算价:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_price3" type="text" id="Tkt_price3" value="<?=$t->Tkt_price3?>" bt="1" char="结算价"/><span class="red">*</span>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">额外金额:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_price4" type="text" id="Tkt_price4" value="<?=$t->Tkt_price4?>" char="额外金额"/>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">每日限购数量:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_num_perday" type="text" id="Tkt_num_perday" value="<?=$t->Tkt_num_perday?>" char="每日限购数量"/>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">提前天数:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_earlydays" type="text" id="Tkt_earlydays" value="<?=$t->Tkt_earlydays?>" char="提前天数"/>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">有效期开始时间:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_starttime" type="text" id="Tkt_starttime" char="有效期开始时间" onclick="DQ_setDate(this)" value="<?=$t->Tkt_starttime==''?'':date("Y-m-d",$t->Tkt_starttime)?>"/>
		&nbsp;&nbsp;</label></td>
	  </tr>  <tr>
		<td width="114" height="25" align="right" class="title01">有效期结束时间:</td>
		<td width="616" class="list_content1"><label><input name="Tkt_endtime" type="text" id="Tkt_endtime" char="有效期结束时间" onclick="DQ_setDate(this)" value="<?=$t->Tkt_endtime==''?'':date("Y-m-d",$t->Tkt_endtime)?>"/>
		&nbsp;&nbsp;</label></td>
	  </tr>
       <tr>
        <td width="114" height="25" align="right" class="title01">运送方式:</td>
        <td width="616" class="list_content1">
        <label><input name="Tkt_shipping" type="radio" value="0" <?php if($t->Tkt_shipping==0){?>checked="checked"<?php }?>/> 短信
    &nbsp;&nbsp;</label> 
        <label><input name="Tkt_shipping" type="radio" value="1" <?php if($t->Tkt_shipping==1){?>checked="checked"<?php }?>/> 邮寄
        </label></td>
      </tr>
	  <tr>
	    <td height="25" align="right" class="title01">必须填项:</td>
	    <td class="list_content1"><input type="checkbox" name="Tkt_needPhone" value="1" <?php if($t->Tkt_needPhone==1){?>checked="checked"<?php }?> />手机&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="Tkt_needCard" value="1" <?php if($t->Tkt_needCard==1){?>checked="checked"<?php }?>/>
          证件号码&nbsp;&nbsp;&nbsp; 
          <input type="checkbox" name="Tkt_needAddr" value="1" <?php if($t->Tkt_needAddr==1){?>checked="checked"<?php }?>/>邮寄地址&nbsp;&nbsp;&nbsp;&nbsp;
          <input type="checkbox" name="Tkt_needCode" value="1" <?php if($t->Tkt_needCode==1){?>checked="checked"<?php }?>/>
          邮政编码
		  
<script language="javascript">
//setRadio_checked("<?=$t->Tkt_needPhone?>",'Tkt_needPhone');
//setRadio_checked("<?=$t->Tkt_needCard?>",'Tkt_needCard');
//setRadio_checked("<?=$t->Tkt_needAddr?>",'Tkt_needAddr');
//setRadio_checked("<?=$t->Tkt_needCode?>",'Tkt_needCode');
</script>		  </td>
    </tr>
    
	  <tr>
	    <td height="25" align="right" class="title01">快递费:</td>
	    <td class="list_content1"><input name="Tkt_freight" type="text" id="Tkt_freight" value="<?=$t->Tkt_freight?>" char="提前天数"/></td>
    </tr>
	  <tr>
	    <td height="25" align="right" class="title01">短信模板:</td>
	    <td class="list_content1"><textarea name="Tkt_msg_mdl" cols="40" rows="5" id="Tkt_msg_mdl" char="模板内容" bt="1"><?=$t->Tkt_msg_mdl?></textarea></td>
    </tr>
	  <tr>
        <td height="25" align="right" class="title01">参数说明:</td>
	    <td class="list_content1"> 将以下参数插入短信内容中形成一句完整的通顺的语句：<br/>
<?php
	$paramInfo=getModelParam();
	if(is_array($paramInfo))
	{
		$str='';
		foreach($paramInfo as $k => $v)
		{
			$str.='<span style="color:#ff0000">'.$v[1].'</span>： '.$v[2].'<br/>';
		}
		echo $str;
	}
	?>
        </td>
    </tr>
    <tr>
    <td width="114" height="25" align="right" class="title01">预订说明:</td>
    <td width="616" class="list_content1"><label><script type="text/javascript">
		KE.show({
			id : 'Tkt_description1',
			cssPath : './index.css',
			urlType : 'absolute',
			resizeMode: "0"
		});	
</script><textarea name="Tkt_description1" id="Tkt_description1" char="预订说明" rows="10" cols="70"><?=htmlspecialchars($t->Tkt_description1)?></textarea>
    &nbsp;&nbsp;</label></td>
  </tr>
   <tr>
    <td width="114" height="25" align="right" class="title01">景点详细描述:</td>
    <td width="616" class="list_content1"><label><script type="text/javascript">
		KE.show({
			id : 'Tkt_description2',
			cssPath : './index.css',
			urlType : 'absolute',
			resizeMode: "0"
		});	
</script><textarea name="Tkt_description2" id="Tkt_description2" char="景点详细描述" rows="10" cols="70"><?=htmlspecialchars($t->Tkt_description2)?></textarea>
    &nbsp;&nbsp;</label></td>
  </tr>
  <tr>
		<td width="114" height="25" align="right" class="title01">题图:</td>
		<td width="616" class="list_content1"><label>网络地址:<input name="Tkt_img" type="text" id="Att_img" value="<?=$t->Tkt_img?>"/><br />本地上传:<input name="upfile6" type="file" id="upfile6" />
		&nbsp;&nbsp;</label></td>
	  </tr>
    <tr>
      <td height="25" colspan="2" align="center" class="list_content1"><input type="button" name="Submit2" value="提交" onclick="this_submit()" />
        &nbsp;&nbsp;
        <input name="reset" type="reset" value="重填" />
        <input name="<?=$tbl_key?>" type="hidden" id="<?=$tbl_key?>" value="<?=$id?>" />
        <input name="act" type="hidden" id="act" value="update" />
		<input name="Tkt_att_id" type="hidden" id="Tkt_att_id"
		value="<?php empty($_GET['attId']) ? 0 : $_GET['attId'];?>" />
	</td>
    </tr>
  </table>
</form>
<!-- 7caihu.com Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");

document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb8797ecb21d1ccb839c35b190277a0cd' type='text/javascript'%3E%3C/script%3E"));

</script>
</body>
</html>
<?php
include_once($base_dir."inc/inc_unconnect.php")
?>